package com.example.musicrecommend.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.musicrecommend.model.entity.Collect;
import com.example.musicrecommend.model.vo.SongVO;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;

/**
* @author PERSON
* @description 针对表【collect(收藏)】的数据库操作Mapper
* @createDate 2024-10-03 17:12:22
* @Entity com.example.musicrecommend.model.entity.Collect
*/
public interface CollectMapper extends BaseMapper<Collect> {

    Page<SongVO> selectCollectSongsPage(Page<SongVO> page, @Param("userId") Serializable userId);

    Collect selectOneIncludeDeleted(@Param(Constants.WRAPPER) Wrapper<Collect> queryWrapper);

    Boolean updateCollectById(@Param("id") Serializable id,@Param("newCollect")Collect newCollect);
}




